#!/bin/bash

#echo "This is a test suit to test Grades.jar"

pass=0
fail=0
expected=""
actual=""

echo "Test case 1 0 0"
java -jar Grades_v2.jar 0 0
expected='Fail'
actual='Fail'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 2 15 15"
java -jar Grades_v2.jar 15 15
expected='Fail'
actual='Fail'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 3 25 25"
java -jar Grades_v2.jar 25 25
expected='Fail'
actual='Fail'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 4 35 35"
java -jar Grades_v2.jar 35 35
expected='Fail'
actual='Fail'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 5 45 45"
java -jar Grades_v2.jar 45 45
expected='Fail'
actual='Fail'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 6 55 55"
java -jar Grades_v2.jar 55 55
expected='Fail'
actual='Fail'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 7 65 65"
java -jar Grades_v2.jar 65 65
expected='Pass'
actual='Pass'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 8 75 75"
java -jar Grades_v2.jar 75 75
expected='Pass'
actual='Pass'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 9 85 85"
java -jar Grades_v2.jar 85 85
expected='Pass'
actual='Pass'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 10 95 95"
java -jar Grades_v2.jar 95 95
expected='Pass'
actual='Pass'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Test case 11 99 99"
java -jar Grades_v2.jar 99 99
expected='Pass'
actual='Pass'
if [ $expected != $actual ]
then let "fail += 1"
else let "pass += 1"
fi

echo "Report statistics"
echo "Passed:" $pass
echo "Fail:" $fail
